home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #2
/
Monster Media No. 2 (Monster Media)(1994).ISO
/
prog_gen
/
verpat00.zip
/
VERPATCH.DOC
< prev
Wrap
Text File
|
1994-07-16
|
5KB
|
146 lines
Version Patching (C)Copyright 1993 Rob Cohan
Here are a pair of programs we use to place version numbers in executable
programs after they're built. We use them all the time and hope you will
find them useful also.
The version patching programs are JokePostcardWare. To register, send a
picture postcard with your favorite joke on it, 1000 words or less.
Send to:
Rob Cohan
PO Box 416
Feasterville, PA 19053-0416
For Clarion programs, create two fields in the MEMORY file:
1) MEM:VersionMinor
The value is the key. These are ASCII 179, 189, every 10 up to 249.
Create these by holding down the Alt key, typing 179 on the keypad
and releasing the Alt key, etc.
You're creating eight characters even though the string is length
four (4).
╔══════════════════════════════════════════
║ Field
║
║ Field Name :VersionMinor
║ Description:Target for version patching
║ Type :String
║ Length : 4
║ Picture :@s4
║ Value :'│╜╟╤█σ∩∙'
2) mem:VersionMajor
╔══════════════════════════════════════
║ Field
║
║ Field Name :VersionMajor
║ Description:
║ Type :String
║ Length : 1
║ Picture :@s1
║ Value :'1'
Whereever you wish to display the version, build it up from the two
fields, such as:
╔════════════════════════════════════════════╗
║ Computed Field ║
║ ║
║ Name :SCR:version ║
║ Picture :@s6 ║
║ Expression :mem:versionmajor & '.' & mem:versionminor
║ Result Field: ║
║ Attribute :Normal ║
║ ║
╚════════════════════════════════════════════╝
Or, you can display them separately.
Once this is done, you have to touch your .app file only when the major
version number changes (the '2' in 2.0.)
Set the Initial Minor Version at the DOS command line using the following
command: (assuming the initial verison in this example is 1.0232)
ECHO 0232 > version
Note: the .EXE must be uncompressed for this operation to succeed.
If you use PKLITE.EXE, it should be used after version patching. Certain
operations automatically call it, though by its primary name only. To bypass
this problem, we have included a .COM file named PKLITE which should be copied
into your local directory (where your .APP is) to provide a false target. It
merely reports the date to the screen. You can later on explicitly run
PKLITE.EXE by its full name and you will bypass the false target .COM file.
An example is given below.
To insert the version number in the final executable, at the DOS command
prompt you can do this, assuming XYZ.EXE is your .EXE name:
INSVER xyz.exe
To make the number increment, just type at the DOS prompt:
BUMPVER
We use a batch file called NEWVER.BAT in each application subdirectory
constructed as follows:
-------------- NEWVER.BAT, cut here -------------------------
bumpver
insver xyz.exe
pklite.exe -a -o xyz.exe
-------------- newver.bat, cut here -------------------------
Sometimes our display of version number is buried in the program in an
"About this program" screen. When we do this, it is not immediately
apparent that a certain executable is not version stamped. On the
primary menu screen we place a flashing red reminder constructed as
follows:
╔════════════════════════════════════════════╗▒▒▒▒
║ Conditional Field ║▒▒▒▒ NVS stands for
║ ║▒▒▒▒ non-version-stamped
║ Name :SCR:noversion ║▒▒▒▒
║ Picture :@s3 ║▒▒▒▒
║ Condition :left(mem:version,4)='│╜╟╤' ║▒▒▒▒
║ If True :'NVS' ║▒▒▒▒
║ If False :'' ║▒▒▒▒
║ Result Field: ║▒▒▒▒
║ Attribute :Red BLK On Black ║▒▒▒▒
╚════════════════════════════════════════════╝▒▒▒▒
We hope you enjoy and find use in these programs.
Disclaimer of Warranty
Users of this software must accept this disclaimer of warranty:
This software is supplied as is.
Rob Cohan disclaims all warranties, either express or implied, including but
not limited to implied warranties of merchantability and fitness for a
particular purpose, with respect to the software and the accompanying
written materials.
No liability for consequential damages. In no event shall Rob Cohan be
liable for any damages whatsoever (including, without limitation, damages
for loss of business profits, business interruption, loss of business
information, or other pecuniary loss) arising out of the use of or
inability to use these products, even if Rob Cohan has been advised
of the possibility of such damages. Because some states do not allow
the exclusion or limitation of liability for consequential or incidental
damages, this software may not be used or licensed in those states.
File list:
INSVER EXE 11990 07-10-93 8:14p
BUMPVER EXE 10156 03-11-93 8:01p
PKLITE COM 325 12-20-91 8:50p
VERPATCH DOC 5163 07-16-94 6:20a